<%--
  Created by IntelliJ IDEA.
  User: 周凯
  Date: 2024/12/25
  Time: 16:18
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="fmt" uri="jakarta.tags.fmt" %>
<%@ taglib prefix="c" uri="jakarta.tags.core" %>
<%@ taglib prefix="fn" uri="jakarta.tags.functions" %>


<style>
    /* 整体页面背景设置为浅灰色系，营造简洁科技感 */
    body {
        font-family: Arial, sans-serif;
        background-color: #f0f0f5;
        margin: 0;
        padding: 0;
        color: #333;
    }

    /* 页面主容器，设置宽度、居中、内边距、背景色及轻微阴影效果 */
    .main-container {
        width: 60%;
        margin: 30px auto;
        padding: 20px;
        background-color: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
    }

    /* 标题样式，字体大小、加粗、颜色及下边距 */
    h1 {
        font-size: 24px;
        font-weight: bold;
        color: #007bff;
        margin-bottom: 15px;
    }

    /* 表单样式 */
    form {
        padding: 10px;
        border: 1px solid #ccc;
        border-radius: 5px;
        background-color: #f9f9f9;
    }

    /* 表单标签样式 */
    label {
        display: block;
        margin-bottom: 8px;
        font-weight: bold;
        color: #333;
    }

    /* 表单输入框样式 */
    input[type="text"],
    input[type="password"] {
        width: 100%;
        padding: 10px;
        margin-bottom: 15px;
        border: 1px solid #ccc;
        border-radius: 3px;
        box-sizing: border-box;
        transition: border-color 0.3s ease;
    }

    input[type="text"]:focus,
    input[type="password"]:focus {
        border-color: #007bff;
    }

    /* 下拉菜单样式 */
    select {
        width: 100%;
        padding: 10px;
        margin-bottom: 15px;
        border: 1px solid #ccc;
        border-radius: 3px;
        box-sizing: border-box;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 10px center;
        background-size: 12px 12px;
    }

    /* 提交按钮样式 */
    input[type="submit"] {
        display: inline-block;
        text-decoration: none;
        padding: 10px 20px;
        border-radius: 3px;
        font-size: 16px;
        color: white;
        background-color: #28a745;
        transition: background-color 0.3s ease;
        margin-bottom: 10px;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
        cursor: pointer;
    }

    input[type="submit"]:hover {
        opacity: 0.8;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    /* 返回按钮样式 */
    .back-button {
        display: inline-block;
        text-decoration: none;
        padding: 8px 16px;
        border-radius: 3px;
        font-size: 14px;
        color: white;
        background-color: #6c757d;
        transition: background-color 0.3s ease;
        margin-bottom: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        cursor: pointer;
    }

    .back-button:hover {
        opacity: 0.8;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    }

    /* 错误提示信息样式 */
    .error-message {
        color: #dc3545;
        margin-bottom: 10px;
        font-size: 14px;
        display: none;
    }

    /* 编号已存在提示信息样式 */
    .id-exists-message {
        color: #dc3545;
        margin-bottom: 10px;
        font-size: 14px;
        display: none;
    }

    /* 表格样式 */
    table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 20px;
    }

    th, td {
        padding: 12px;
        text-align: left;
        border-bottom: 1px solid #ddd;
    }

    th {
        background-color: #f2f2f2;
        font-weight: bold;
    }

    tr:hover {
        background-color: #f5f5f5;
    }
</style>

<div class="main-container">
    <h1>日志记录</h1>
    <!-- 查询结果表格 -->
    <c:if test="${empty goodsOpRecords}">
        <p>暂无记录</p>
    </c:if>
    <c:if test="${not empty goodsOpRecords}">
        <table>
            <thead>
            <tr>
                <th>操作人</th>
                <th>操作前</th>
                <th>操作后</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach var="item" items="${goodsOpRecords}">
                <tr>
                    <td>${item.personName}</td>
                    <td>${item.XGood}</td>
                    <td>${item.YGood}</td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </c:if>
</div>
